package space.misiro.ledgers.keycloak.client.api

import org.keycloak.representations.idm.UserRepresentation
import space.misiro.ledgers.keycloak.client.model.KeycloakUser

interface KeycloakDataService {
    fun createDefaultSchema()

    fun clientExists(): Boolean

    fun getUser(realm: String, login: String): UserRepresentation?

    fun createUser(user: KeycloakUser)

    fun updateUser(user: KeycloakUser, userIdentifier: String)

    fun userExists(login: String): Boolean

    fun deleteUser(login: String)

    fun resetPassword(login: String, password: String)

    fun resetPasswordViaEmail(login: String)

    fun assignRealmRoleToUser(login: String, realmRoles: List<String>)

    fun removeRealmRoleFromUser(login: String, realmRoles: List<String>)
}